Path: blob/master/Part 10 - Model Selection And Boosting/k-Fold Cross Validation/[R] k-Fold Cross Validation.ipynb
1350 views
Kernel: R
k-Fold Cross Validation
Data preprocessing
In [1]:
In [2]:
In [3]:
In [4]:
Fitting classifier to the Training set
In [5]:
Predicting the Test set results
In [6]:
In [7]:
Out[7]:
In [8]:
Out[8]:
Applying k-Fold Cross Validation
In [9]:
Out[9]:
Loading required package: lattice
Loading required package: ggplot2
In [10]:
In [11]:
Out[11]:
In [12]:
Out[12]:
In [13]:
Out[13]:
This signifies that we are in Low Bias Low Variance category in Bias-Variance TradeOff.
Making the Confusion Matrix
In [14]:
Out[14]:
y_pred
0 1
0 45 6
1 4 25
classifier made 45 + 25 = 75 correct prediction and 6 + 4 = 10 incorect predictions.
Visualising the Training set results
In [15]:
Out[15]:
Visualising the Test set results
In [16]:
Out[16]:
Looks like it is much better the Linear kernel.